﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace Simple.Admin.Migrations
{
    /// <inheritdoc />
    public partial class add_menuentity : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "Menus",
                columns: table => new
                {
                    Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
                    Name = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Path = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Component = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Redirect = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    ActiveIcon = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ActivePath = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    AffixTab = table.Column<bool>(type: "bit", nullable: false),
                    AffixTabOrder = table.Column<int>(type: "int", nullable: false),
                    Authority = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Badge = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    BadgeType = table.Column<int>(type: "int", nullable: true),
                    BadgeVariants = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    HideChildrenInMenu = table.Column<bool>(type: "bit", nullable: false),
                    HideInBreadcrumb = table.Column<bool>(type: "bit", nullable: false),
                    HideInMenu = table.Column<bool>(type: "bit", nullable: false),
                    HideInTab = table.Column<bool>(type: "bit", nullable: false),
                    Icon = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    IframeSrc = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    IgnoreAccess = table.Column<bool>(type: "bit", nullable: false),
                    KeepAlive = table.Column<bool>(type: "bit", nullable: true),
                    Link = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Loaded = table.Column<bool>(type: "bit", nullable: true),
                    MaxNumOfOpenTab = table.Column<int>(type: "int", nullable: false),
                    MenuVisibleWithForbidden = table.Column<bool>(type: "bit", nullable: false),
                    NoBasicLayout = table.Column<bool>(type: "bit", nullable: false),
                    OpenInNewWindow = table.Column<bool>(type: "bit", nullable: false),
                    Order = table.Column<int>(type: "int", nullable: true),
                    Query = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Title = table.Column<string>(type: "nvarchar(max)", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Menus", x => x.Id);
                });
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "Menus");
        }
    }
}
